<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="stylesheet" type="text/css" href="../../static/css/jpetstore.css"/>
    <meta charset="UTF-8">
    <title>Backstage</title>
    <link rel="stylesheet" href="../css/jpetstore.css" type="text/css" media="screen" />

</head>
<body>

<div th:replace="common/left">

</div>

<div id="BackLink">
    <a th:href="'/admin_catalog/admin_viewCategory?categoryId='+${product.categoryId}">
        Return to <label th:text="${product.categoryId}">Category ID</label>
    </a>
</div>

<div id="bCatalog">

    <h2 th:text="${product.name}">product Name</h2>

    <table id="CPI">
        <tr>
            <th>Item ID</th>
            <th>Product ID</th>
            <th>Description</th>
            <th>List Price</th>
            <th>&nbsp&nbsp&nbsp</th>
        </tr>

        <tr th:each="item:${itemList}">
            <!--<td >-->
            <!--<a th:href="'/catalog/viewItem?itemId='+${item.itemId}" th:text="${item.itemId}">item itemId</a>-->
            <!--</td>-->
            <td><a th:href="'/admin_catalog/admin_viewItem?itemId='+${item.itemId}" th:text="${item.itemId}">Item ID</a></td>
            <td th:text="${item.productId}">
                productId
            </td>

            <td th:text="${item.attribute1}+' '+ ${product.name}">
                itemAttribute
            </td>
            <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">Item List Price</td>
            <!--<fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00" />-->
            <!--<td th:text="${#dates.format(item.listPrice,'$#,##0.00')}">-->
            <!--item listPrice-->
            <!--</td>-->

            <td >
                <a class="Button" th:href="'/admin_catalog/admin_changeItem?itemId='+${item.itemId}"> 修改</a>
                <a class="Button" th:href = "'/admin_catalog/admin_deleteItem?itemId='+${item.itemId}"> 删除</a>
            </td>
        </tr>


        <tr>
            <td>
            </td>
        </tr>
    </table>


</body>
</html>